package parameter

import (
	"github.com/gogf/gf/v2/frame/g"
)

type GetMenuReq struct {
	g.Meta `path:"/menu" method:"get"`
	userId uint
}

func (s *GetMenuReq) SetUserId(userId uint) {
	s.userId = userId
}
func (s *GetMenuReq) GetUserId() uint {
	return s.userId
}

type GetMenuRes struct {
	HomeInfo_ HomeInfo   `json:"homeInfo" description:"首页"`
	LogoInfo_ LogoInfo   `json:"logoInfo" description:"Logo"`
	MenuInfo  []*MenuRes `json:"menuInfo" description:"菜单"`
}
type HomeInfo struct {
	Title string `json:"title"`
	Href  string `json:"href"`
}
type LogoInfo struct {
	Title string `json:"title"`
	Image string `json:"image"`
	Href  string `json:"href"`
}
type MenuRes struct {
	Id       uint       `json:"id" description:"id"`
	ParentId uint       `json:"parentId" description:"parentId"`
	Title    string     `json:"title" description:"菜单名称"`
	Icon     string     `json:"icon" description:"icon"`
	Href     string     `json:"href" description:"链接地址"`
	Target   string     `json:"target" description:"目标地址"`
	Children []*MenuRes `json:"child" description:"子节点"`
}
